package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.po.WarehouseLocation;
import com.zhijian.warehouse.manage.entity.vo.request.WarehouseLocationSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.WarehouseLocationVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface WarehouseLocationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(WarehouseLocation record);

    int insertSelective(WarehouseLocation record);

    WarehouseLocation selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(WarehouseLocation record);

    int updateByPrimaryKey(WarehouseLocation record);

    /**
     * 查询总数
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    int count(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 查询列表
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    List<WarehouseLocationVo> selectList(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 查询单个
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    WarehouseLocationVo selectOne(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    WarehouseLocationVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param warehouseLocationSearchVo
     * @return
     */
    void deleteByCondition(WarehouseLocationSearchVo warehouseLocationSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<WarehouseLocation> entities);

    /**
     * 根据WarehouseId查询列表
     *
     * @param warehouseId
     * @return
     */
    List<WarehouseLocationVo> selectListByWarehouseId(Long warehouseId);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<WarehouseLocationVo> selectListByCreateUserId(Long createUserId);

    /**
     * 根据UpdateUserId查询列表
     *
     * @param updateUserId
     * @return
     */
    List<WarehouseLocationVo> selectListByUpdateUserId(Long updateUserId);

    void updateBarCodeNull(@Param("id") Long id);
}